<template>
  <div id="ResourceManage">
    <a-tabs default-active-key="1">
      <a-tab-pane key="1" tab="文件资源">
        <FileResource ref="FileResource" />
      </a-tab-pane>
      <a-tab-pane key="2" tab="题库资源">
        <QuestionResource ref="QuestionResource" />
      </a-tab-pane>
    </a-tabs>
  </div>
</template>
<script>
import FileResource from "@/components/ResourceManag/FileResource.vue"; //文件资源
import QuestionResource from "@/components/ResourceManag/QuestionResource.vue"; //题库资源
export default {
  components: {
    FileResource,
    QuestionResource,
  },
  data() {
    return {
      columns: [
        //主页table列的配置
        {
          title: "序列号",
          dataIndex: "name",
          scopedSlots: { customRender: "name" },
        },
        {
          title: "姓名",
          dataIndex: "number",
          customRender: (text, record) => {
            return record.number ? record.number : "—";
          },
        },
        {
          title: "所属届",
          dataIndex: "createTime",
          customRender: (text, record) => {
            return record.createTime ? record.createTime : "—";
          },
        },
        {
          title: "考核用时",
          dataIndex: "isConnect",
          customRender: (text, record) => {
            return record.isConnect ? record.isConnect : "—";
          },
        },
        {
          title: "创建时间",
          dataIndex: "isConnect",
          customRender: (text, record) => {
            return record.isConnect ? record.isConnect : "—";
          },
        },
        {
          title: "操作",
          dataIndex: "operation",
          scopedSlots: { customRender: "operation" },
        },
      ],
      tableData: [
        //主页表格的数据
        {
          name: "项目1",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目2",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目3",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目4",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目5",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目6",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目7",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目8",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目9",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目10",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
        {
          name: "项目11",
          number: "001",
          createTime: 2022,
          isConnect: "是",
          tapdProjectId: "关联项目1",
          operation: "我的操作",
        },
      ],
      tablePagination: {
        //主页表格的分页器
        total: 0,
        current: 1,
        pageSize: 10,
        showQuickJumper: true, //是否可以快速跳转至某页
        showSizeChanger: true, //是否可以改变 pageSize
      },
    };
  },
  created() {},
  computed: {},
  methods: {
    onClose() {
      //点击抽屉层或右上角叉或取消按钮的回调
      this.visible = false;
    },
    bottomContainerOk() {
      //点击抽屉层的确定按钮事件
      this.bottomContainerCancel();
    },
    bottomContainerCancel() {
      //点击抽屉层的取消按钮事件
      this.selectedRowKeys = [];
      this.visible = false;
    },
    drawerChange() {
      //监听抽屉弹出层表格页码的变化
      this.selectedRowKeys = [];
    },
  },
};
</script>
<style lang="scss" scoped>
#ResourceManage {
  background: #ffffff;
  padding: 24px 32px;
  margin: 30px 20px 0 20px;
  border-radius: 2px;
}
</style>
<style lang="scss">
#ResourceManage {
  height: 800px;
  background: url("~@/assets/img/tableDataBg.png") repeat 100% !important;
  background-size: cover !important;
  .ant-input-group-wrapper {
    top: 0 !important;
  }
}
</style>